home *** CD-ROM | disk | FTP | other *** search
/ SunSoft Catalyst CDWARE 1996 May to August / Catalyst CDWARE 1996 May to August.iso / .products / Microport_Systems / _install / install_unbundled next >
Text File  |  1996-02-12  |  3KB  |  144 lines

  1. #! /bin/sh
  2. #
  3. #    Installation shell script for installing Session Log on Hard Drive from Catalyst CDware
  4. #
  5. #     Usage: install_ap -m<mountpoint> -p<productpath>
  6. #
  7. #    Created:     June 12, 1991
  8. #    Last Revised:   January 27, Microport Systems
  9. #
  10. # function for error exiting
  11.  
  12. end_it () {
  13. echo " "
  14.   echo "Hit return to exit this part of the installation..."        
  15.   read answer
  16.  
  17. exit 0
  18. }
  19.  
  20.  
  21. #
  22. #    get command line parameters
  23. #
  24. MOUNT_PARM=$1
  25. PRODUCT_PARM=$2
  26. #    set PRODUCT_SIZE to the size of your product in kbytes     
  27. PRODUCT_SIZE=2200
  28.  
  29.  
  30. #
  31. #    get complete paths
  32. #
  33. MOUNT_PATH=`echo $MOUNT_PARM | egrep -e -m | sed -e 's/-m//'`
  34. PRODUCT_DIR=`echo $PRODUCT_PARM | egrep -e -p | sed -e 's/-p//'`
  35. #PRODUCT_PATH=$MOUNT_PATH/$PRODUCT_DIR
  36. PRODUCT_PATH=$COMPANY_DIR
  37.  
  38. #
  39. #    get location of installation directory 
  40. #
  41. echo
  42. echo "Please enter the absolute path name of the directory in which you would "
  43. echo "like to install Session Log."
  44. echo
  45. echo "Installation directory: "
  46. read INSTALL_DIR
  47. #
  48. #    verify the installation directory exists and is a directory
  49. #
  50. if [ ! -d "$INSTALL_DIR" ]
  51. then
  52.         echo
  53.     echo "Creating $INSTALL_DIR ..."
  54.     mkdir $INSTALL_DIR
  55.     if [ ! -d "$INSTALL_DIR" ]
  56.     then
  57.         echo
  58.         echo
  59.         echo "Could not create the installation directory."
  60.         echo
  61.         echo "Exiting the installation script."
  62.         read a
  63.         exit 1
  64.     fi
  65. fi
  66.  
  67. #
  68. #    verify write permission for the installation directory
  69. #
  70. if [ ! -w "$INSTALL_DIR" ]
  71. then
  72.     echo
  73.     echo
  74.     echo "You do not have write permission for the installation directory: "
  75.     echo $INSTALL_DIR
  76.     echo
  77.     echo "Exiting the installation script."
  78.         read a
  79.     exit 1
  80. fi
  81.  
  82. #
  83. #    verify free disk space
  84. #
  85. echo    
  86. echo    "Verifying free disk space ..."
  87. FREE_SPACE=0
  88. df=/tmp/FREE.$$
  89. df $INSTALL_DIR | sed /kbytes/d | sed -e '3,$d' | sed -e '1,$s/  */ /g' > $df
  90.  
  91. case `wc -l $df | sed -e 's/^ *//' | cut -f1 -d" " ` in
  92.     1) FREE_SPACE=`cat $df | cut -f4 -d" "` ;; 
  93.     2) FREE_SPACE=`cat $df | sed 1d | sed 's/^ *//' | cut -f3 -d" "` ;; 
  94. esac
  95.  
  96. if [ -n $FREE_SPACE ]
  97. then
  98.     if [ $FREE_SPACE -lt $PRODUCT_SIZE ]
  99.     then
  100.         echo
  101.         echo
  102.         echo "The Session Log installation requires $PRODUCT_SIZE kbytes of"
  103.         echo "free disk space. There is only $FREE_SPACE kbytes of free" 
  104.         echo "disk space in the selected filesystem.  Please free up some"
  105.         echo "disk space and try this installation again."
  106.         echo
  107.         echo "Exiting the installation script."
  108.         read a
  109.         exit 1
  110.     fi
  111. fi
  112.  
  113. /bin/rm $df 2>/dev/null
  114.  
  115. #
  116. #    copy binaries to installation directory
  117. #
  118. echo
  119. echo    "Copying, uncompressing, and untar'ing files to $INSTALL_DIR ..." 
  120.  
  121. cp -r $PRODUCT_PATH/_install/session_log_209_sol.tar.Z $INSTALL_DIR
  122. cd $INSTALL_DIR
  123. zcat  $INSTALL_DIR/session_log_209_sol.tar.Z | tar xf -
  124.  
  125. echo
  126. echo
  127. echo "First part of installation complete!"
  128. echo
  129. echo "You MUST manually install the Session Log driver before"
  130. echo "using Session Log.  To install the driver and run Session Log: "
  131. echo
  132. echo "  1. Change directories to: $INSTALL_DIR"
  133. echo "  2. Become super user."
  134. echo "  3. Type the command: 'microinstall'"
  135. echo "  4. Reboot the computer one time to active the driver."
  136. echo "  5. Type 'mplog' from the install directory."
  137. echo 
  138. echo "  Session Log can be uninstalled at any time with the command"
  139. echo "     microuninstall"
  140. echo
  141.  
  142. end_it
  143.  
  144.